<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    // 任何两个对象都不相等
    //  var arr1 = [];
    //  var arr2 = new Array();
    //  var arr3 = [];
    
    //  console.log(arr1);
    //  console.log(arr2);
    //  console.log(arr3);

    //  console.log(arr1 === arr2);
    //  console.log(arr1 === arr3);


    //  var str1 = "hello";
    // var str2 = "hello";
    // console.log(str1 === str2);


    var arr1 = ["hello", "world"];
    var arr2 = new Array("hello", "world");
    var arr1 = [2,3,4];
    var arr2 = new Array(2,3,4);
    var arr1 = [5];
    var arr2 = new Array(5);
    console.log(arr1);
    console.log(arr1.length);
    console.log(arr2);
    console.log(arr2.length);
    //有且只有一个数值型数据时，字面量就是作为数据存储，构造函数作为长度使用，每个数据都是undefined
    
    </script>
</body>
</html>